import request from '@/utils/request'

//查询部门的列表
export function listDept() {
  return request({
    url: '/business/customer/deptList',
    method: 'get',
  })
}

// 查询客户crud列表
export function listCustomer(query) {
  return request({
    url: '/business/customer/list',
    method: 'get',
    params: query
  })
}

// 查询客户crud详细
export function getCustomer(id) {
  return request({
    url: '/business/customer/' + id,
    method: 'get'
  })
}

// 新增客户crud
export function addCustomer(data) {
  return request({
    url: '/business/customer',
    method: 'post',
    data: data
  })
}

// 修改客户crud
export function updateCustomer(data) {
  return request({
    url: '/business/customer',
    method: 'put',
    data: data
  })
}

// 删除客户crud
export function delCustomer(id) {
  return request({
    url: '/business/customer/' + id,
    method: 'delete'
  })
}

// 导出客户crud
export function exportCustomer(query) {
  return request({
    url: '/business/customer/export',
    method: 'get',
    params: query
  })
}
